package com.ian.service.impl;

import com.ian.dao.PerUserMapper;
import com.ian.pojo.PerUser;
import com.ian.service.PerUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 用户service实现
 *
 * @Author IanZy
 * @Date 2020/6/13
 */
@Service
public class PerUserServiceImpl implements PerUserService {
    @Autowired
    PerUserMapper perUserMapper;

    @Override
    public PerUser findByTel(String perUserTel) {
        return perUserMapper.findByTel(perUserTel);
    }

    @Override
    public String findPwdByTel(String perUserTel) {
        return perUserMapper.findPwdByTel(perUserTel);
    }

    @Transactional
    @Override
    public int insert(PerUser record) {
        return perUserMapper.insert(record);
    }

    @Override
    @Transactional
    public int updateByTel(PerUser record) {
        return perUserMapper.updateByTel(record);
    }

    @Transactional
    @Override
    public int updateByPrimaryKey(PerUser record) {
        return perUserMapper.updateByPrimaryKey(record);
    }

    @Override
    public PerUser selectByPrimaryKey(Integer perUserId) {
        return perUserMapper.selectByPrimaryKey(perUserId);
    }
}
